# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net"
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libowfat
pkgver=0.32
pkgrel=1
pkgdesc="Reimplementation of libdjbr"
url="http://www.fefe.de/libowfat/"
arch="all"
license="GPL-2.0-only"
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.fefe.de/$pkgname/$pkgname-$pkgver.tar.xz
	libowfat-0.32-gcc10.patch
	"

build() {
	make CFLAGS="-I. $CFLAGS"
}

package() {
	make prefix="$pkgdir"/usr \
		MAN3DIR="$pkgdir"/usr/share/man/man3 \
		install

	# buffer manpage conflicts with openssl
	mv "$pkgdir"/usr/share/man/man3/buffer.3 \
		"$pkgdir"/usr/share/man/man3/owfatbuffer.3
}

sha512sums="c762a1aa27dfb30e2f6da67d1ad16da03d301b2e3cce33c83b69103183a6689a494c8cf8d7d4e26ad5b22130e4e0560d5f3ef6f44b14d706f10e2300ce11ff3b  libowfat-0.32.tar.xz
ba3eef982f8345a96b2612bfbb8a97dc6477b21a58a35cda513ecdcd346b0cbf752574d565003f1d6887cda4467d8efc5777aa4d80fd50f731d35387028cda84  libowfat-0.32-gcc10.patch"
